home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-08-06 | 1.8 KB | 66 lines | [TEXT/CWIE] |
- // ===========================================================================
- // CTCPResponder.h ©1995-1998 Metrowerks Inc. All rights reserved.
- // ===========================================================================
-
- #pragma once
-
- #include <LSingleDoc.h>
- #include <LInternetAddress.h>
-
- #include <LTCPEndpoint.h>
-
- #include "CSimpleTCPServer.h"
- #include "CTerminalPane.h"
-
- class CTCPResponderThread;
-
- // ===========================================================================
- // • CTCPResponder
- // ===========================================================================
-
- class CTCPResponder : public PP_PowerPlant::LSingleDoc {
-
- public:
- CTCPResponder(
- LCommander* inSuper);
-
- virtual void Accept(CSimpleTCPServer * inServer);
- virtual void Disconnect();
- virtual Boolean IsIdle();
-
- virtual Boolean AllowSubRemoval(
- LCommander* inSub);
- virtual Boolean HandleKeyPress(
- const EventRecord& inKeyEvent);
-
- virtual void BindCompleted();
- virtual void BindFailed();
-
- virtual void ServerThreadDied();
-
- virtual Boolean AttemptQuitSelf(
- SInt32 inSaveOption);
-
- protected:
-
- virtual ~CTCPResponder();
-
- void BuildServerWindow();
- void SetWindowTitle(
- PP_PowerPlant::LInternetAddress & inAddress);
-
- PP_PowerPlant::LTCPEndpoint* mEndpoint;
-
- char mLineBuffer[256]; // linemode send buffer
- UInt16 mLineBufferIndex; // size of mLineBuffer
- bool mLineMode; // true if buffering for entire line
- bool mEchoCharacters; // true to echo keyboard input to screen
-
- CTerminalPane* mTerminalPane; // terminal display for this connection
-
- CTCPResponderThread* mResponderThread; // the thread that actually handles the connection
-
- bool mQuitWhenDone; // re-issue quit request when disconnect complete
- SInt32 mSaveOption;
- };
-